package com.bittech.wiki_learn.controller;

import com.bittech.wiki_learn.domain.Demo;
import com.bittech.wiki_learn.service.DemoService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/demo")
public class DemoController {
    @Resource
    private DemoService demoService;

    @RequestMapping(value = "/getAll",method = RequestMethod.GET)
    public List<Demo> getAll() {
        return demoService.getAll();
    }
}
